﻿using System;
using System.Collections.Generic;
using System.Collections;
using TCKQKL.Service.DataContract;
using StockTrader.BusinessService.DataContract.Mortgate;

namespace TCKQKL.DAL.IDAL
{
    public interface IInvestor
    {
        void BeginADOTransaction();
        void RollBackTransaction();
        void CommitADOTransaction();
        void Open(string connString);
        void Close();

        DateTime getTradingDate();
        InvestorDataModel login(string accountNo, string password);
        void logOutUser(string accountNo);
        InvestorDataModel getInvestorData(string accountNo);
        List<InvestorDataModel> getAssignInvestorData(decimal investorID);
        List<InvestorDataModel> getAssignInvestorDataByName(decimal investorID);
        InvestorDataProfileModel getInvestorProfileData(decimal investorID);
        List<TransDataModel> getTransByInvestorId(decimal investorID, DateTime start, DateTime end);
        decimal getRemain(decimal investorID, DateTime selected);

        List<OrdersBoscModel> getOrders(decimal investorID);
        List<OrdersBoscModel> getOrdersWaiting(decimal investorID);
        List<OrdersBoscModel> getOrdersTopN(decimal investorID, int topN);
        List<OrdersBoscModel> getOrdersHistory(decimal investorID, DateTime start, DateTime end);
        List<OrdersBoscModel> getOrdersHistoryDetail(decimal investorID, DateTime fromDate, DateTime toDate, string orderType, string orderClass, string orderSide, string symbol, string ID, decimal priceLow, decimal priceHigh, decimal qttyLow, decimal qttyHigh);
        List<AccountDataModel> getAccountDataByInvestorId(decimal investorID);
        List<BankDataModel> getBankDataByInvestorId(decimal investorID);
        BankDataModel getBankDataByDate(decimal investorID, DateTime selected);
        decimal getNettingAmountByInvestorId(decimal investorID);

        List<MatchedResultModel> getMatchedResult(decimal investorID);
        List<MatchedResultModel> getMatchedResultTopN(decimal investorID, int topN);
        List<MatchedResultModel> getMatchedResultHistory(decimal investorID, DateTime start, DateTime end);
        List<MatchedResultModel> getMatchedResultByInvestorId(decimal investorID);
        decimal getTradingAmountByAccountNo(string AccountNo);
        int getTradingQuantityByStockCode(string AccountNo, string StockCode);
        List<DateTime> getBackDate();
        decimal getPreLoanByInvestor(decimal investorid);
        List<AccountDataModel> getStockNettingInvestorId(decimal investorID, DateTime transdate);
        bool isClearingDone();

        AccountData getCustomerInfo(string AccountNo); 

    }
}
